package com.ruoyi.xiaoshou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xiaoshou.mapper.SalesDeliveryMapper;
import com.ruoyi.xiaoshou.domain.SalesDelivery;
import com.ruoyi.xiaoshou.service.ISalesDeliveryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售发货记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class SalesDeliveryServiceImpl implements ISalesDeliveryService 
{
    @Autowired
    private SalesDeliveryMapper salesDeliveryMapper;

    /**
     * 查询销售发货记录
     * 
     * @param id 销售发货记录主键
     * @return 销售发货记录
     */
    @Override
    public SalesDelivery selectSalesDeliveryById(Long id)
    {
        return salesDeliveryMapper.selectSalesDeliveryById(id);
    }

    /**
     * 查询销售发货记录列表
     * 
     * @param salesDelivery 销售发货记录
     * @return 销售发货记录
     */
    @Override
    public List<SalesDelivery> selectSalesDeliveryList(SalesDelivery salesDelivery)
    {
        return salesDeliveryMapper.selectSalesDeliveryList(salesDelivery);
    }

    /**
     * 新增销售发货记录
     * 
     * @param salesDelivery 销售发货记录
     * @return 结果
     */
    @Override
    public int insertSalesDelivery(SalesDelivery salesDelivery)
    {
        return salesDeliveryMapper.insertSalesDelivery(salesDelivery);
    }

    /**
     * 修改销售发货记录
     * 
     * @param salesDelivery 销售发货记录
     * @return 结果
     */
    @Override
    public int updateSalesDelivery(SalesDelivery salesDelivery)
    {
        return salesDeliveryMapper.updateSalesDelivery(salesDelivery);
    }

    /**
     * 批量删除销售发货记录
     * 
     * @param ids 需要删除的销售发货记录主键
     * @return 结果
     */
    @Override
    public int deleteSalesDeliveryByIds(String ids)
    {
        return salesDeliveryMapper.deleteSalesDeliveryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除销售发货记录信息
     * 
     * @param id 销售发货记录主键
     * @return 结果
     */
    @Override
    public int deleteSalesDeliveryById(Long id)
    {
        return salesDeliveryMapper.deleteSalesDeliveryById(id);
    }
}
